<?php
class Wee_Logging_Model_Handler_Models{
    public function modelSaveAfter($model, $processor){
        $processor -> collectId($model);
        $changes = Mage :: getModel('wee_logging/event_changes') -> setOriginalData($model -> getOrigData()) -> setResultData($model -> getData());
        return $changes;
    }
    public function modelDeleteAfter($model, $processor){
        $processor -> collectId($model);
        $changes = Mage :: getModel('wee_logging/event_changes') -> setOriginalData($model -> getOrigData()) -> setResultData(null);
        return $changes;
    }
    public function modelMassUpdateAfter($model, $processor){
        return $this -> modelSaveAfter($model, $processor);
    }
    public function modelMassDeleteAfter($model, $processor){
        return $this -> modelSaveAfter($model, $processor);
    }
    public function modelViewAfter($model, $processor){
        $processor -> collectId($model);
        return true;
    }
}
